package cn.tedu.controller;


import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import cn.tedu.entity.*;
import cn.tedu.service.ConstructionService;
import cn.tedu.service.impl.ConstructionServiceImpl;
import java.util.*;
/**
 * 专业共建
 * @author waqwb
 *
 */
public class ConstructionServlet extends HttpServlet {
	@Override
	protected void service(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
		System.out.println("ConstructionServlet!!!");
		resp.setContentType("text/html;charset=utf-8");
		ConstructionService cs = new ConstructionServiceImpl();
		List<Specialty> spList = cs.spList();
		System.out.println(spList);
		List<Laboratory> labList = cs.labList();
		System.out.println(labList);
		List<Teacher> tList = cs.teachList();
		System.out.println(tList);
		req.setAttribute("spList", spList);
		req.setAttribute("labList", labList);
		req.setAttribute("tList", tList);
		req.getRequestDispatcher("gongjian.jsp").forward(req, resp);
	}
}
